/**
 * Created by ebalmes Oct 6, 2009 8:42:04 AM
 * 
 */
package gui.menus;

import java.awt.Component;

import gui.actions.ActionFactory;

import javax.swing.Action;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JSeparator;

public class PatientMenuBar extends JMenuBar
{
  private static final JSeparator SEPARATOR = new JSeparator(JSeparator.HORIZONTAL);
  private JFrame owner;

  public PatientMenuBar(JFrame owner) {
    this.owner = owner;
    createFileMenu();
  }

  private void createFileMenu() {
    JMenu fileMenu = new JMenu("File");
    fileMenu.add(ActionFactory.getCreatePatientDialog(owner));
    
    fileMenu.add(new JMenuItem(ActionFactory
        .getOpenPatientDialogAction(owner)));
    fileMenu.add(ActionFactory.getSaveAction());
    fileMenu.add(SEPARATOR);
    
    fileMenu.add(new JMenuItem(ActionFactory.getExitAppAction()));
    add(fileMenu);
  }
}
